package com.yjzx;

import com.yjzx.factory.PropertiesFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.stereotype.Component;

/**
 * @author yjzx
 * @date 2023/10/20
 * @description
 */
@Component
@EnableConfigurationProperties
@SpringBootApplication
public class App implements CommandLineRunner {
    public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(App.class, args);

        System.out.println();
    }


    @Autowired(required = false)
    private PropertiesFactory propertiesFactory;

    @Override
    public void run(String... args) throws Exception {
        propertiesFactory.execute();

    }
}
